<template>
	<view class="flex-col col-center m-b-32" @tap="navigate">
		<u-image class="m-b-14" :border-radius="$px2rpx(styles.img_border_radius)" v-if="content.style == 1" :src="$getImageUri(item.url)" width="82rpx" height="82rpx" />
		<view class="xs" :style="{ color: styles.color }">{{ item.name }}</view>
	</view>
</template>

<script type="text/javascript">
export default {
	props: {
		content: {
			type: [Object, Array]
		},
		styles: {
			type: [Object, Array]
		},
		item: {
			type: Object
		}
	},
	data() {
		return {};
	},
	methods: {
		navigate() {
			const { miniapp, path, params } = this.item.link;
			if (!path) return;
			if (miniapp == 1) {
				console.log('前往小程序')
				uni.navigateToMiniProgram({
					appId: 'wxfdd6ee75dace0d1c',
					path: path + '?id=2',
					// envVersion:'trial',
					success(res) {
						
					}
				});
			} else {
				this.$Router.push({
					path: path,
					query: params
				});
			}
		}
	},
	computed: {}
};
</script>
